package com.hitsoysauce.l0114.dymicproxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class DymicSubject implements InvocationHandler {
	
	private Object sub;
	
	public DymicSubject(Object o) {
		this.sub = o;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("before calling:" + method);
		
		method.invoke(sub, args);
		
		System.out.println("after calling:" + method);
		
		return null;
	}
}
